package com.xinchao.ck_mips.utils.download;

import java.util.List;

/**
 * Created by zhangbw on 2018/9/28.
 * 多线程下载回调
 */

public interface MultiThreadDownload {
    /**
     * 开始下载
     */
    void onStart(MultiThreadBean multiThreadBean, long max);

    /**
     * 正在下载
     */
    void onDownloading(MultiThreadBean multiThreadBean, long currentSize);

    void onDownloadSuccess(MultiThreadBean multiThreadBean, String localFileName);

    void onDownloadFailed(MultiThreadBean multiThreadBean, Throwable throwable);

    /**
     * 下载完了
     */
    void onDownloadAll(boolean isDownloadAll, List<MultiThreadBean> downloadBeans);
}
